<!-- Generated automatically from an XML file of the same name.
     Copyright: Stephen J. Sangwine and Nicolas Le Bihan, 2008-2010.
--><html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>randv :: Functions (Quaternion Toolbox Function Reference)
</title><link rel="stylesheet" href="qtfmstyle.css" type="text/css"></head><body><h1>Quaternion Function Reference</h1><h2>randv</h2>
<p>Uniformly distributed vectors (pure quaternions)</p>
<h2>Syntax</h2><p><tt>Y = randv(varargin)</tt></p>
<h2>Description</h2>
<p>
<tt>randv</tt> constructs uniformly distributed unit vectors (distributed
uniformly in 3-space). It accepts the same parameters as the MATLAB&reg;
functions <tt>rand</tt> and <tt>randn</tt>.
</p>
<p>
Each unit vector returned is the result of two calls on the MATLAB&reg; function
<tt>rand</tt>, and hence <tt>randv</tt> modifies the state of the
generator used by <tt>rand</tt>.
To initialise the generator or control the choice of generator, use
<tt>rand</tt>.
</p>

<h2>Examples</h2>
<pre>
&gt;&gt; randv(2)
 
ans = 2x2 pure quaternion array
 
&gt;&gt; abs(ans)

ans =

    1.0000    1.0000
    1.0000    1.0000
</pre>

<h2>See Also</h2>QTFM function: <a href="randq.html">randq</a><br>MATLAB&reg; function: <a href="matlab:doc rand">rand</a><br>
<h4>&copy; 2008-2010 Stephen J. Sangwine and Nicolas Le Bihan</h4><p><a href="license.html">License terms.</a></p></body></html>